#include <math.h>
#include <iostream>

using namespace std;

int main()
{
	int num = 0.0;
	int base = 3;
	
	num = pow( base, base );
	
	cout << num << endl;
	
}
